import request from "../utils/request";

/* 创建球队 */
export const createTeam = (data = {}) => {
	return request({
		url: "/public/mobile/gameTeam/baseSave",
		method: "POST",
		data
	})
}

/* 球队列表 */
export const queryTeamList = (data = {}) => {
	return request({
		url: "/public/mobile/gameTeam/pages",
		method: "POST",
		data
	})
}

/* 所有球队 */
export const getTeamAll = (data = {}) => {
	return request({
		url: "/public/mobile/gameTeam/all",
		method: "GET",
		data
	})
}

/* 球队详情 */
export const queryTeamDetail = (id = "") => {
	return request({
		url: `/public/mobile/gameTeam/detail/${id}`,
		method: "GET"
	})
}

/* 删除球队 */
export const teamDelete = (id) => {
	return request({
		url: `/public/gameTeam/del/${id}`,
		method: "GET",
	})
}

/* 组别列表 */
export const queryGroupAll = (data = {}) => {
	return request({
		url: "/public/mobile/gameGroup/all",
		method: "GET",
		data,
	})
}

/* 在线报名 */
export const signUp = (data = {}) => {
	return request({
		url: "/public/gameSignUp/saveGameSignUp",
		method: "POST",
		data
	})
}

/*审核通过球员 */
export const auditOk = (data = {}) => {
	return request({
		url: "/public/gameSignUp/leadApprovedByReviewExamine",
		method: "GET",
		data,
	})
}

/* 审核驳回球员 */
export const auditFail = (data = {}) => {
	return request({
		url: "/public/gameSignUp/leadReviewFailedExamine",
		method: "GET",
		data,
	})
}

/* 移除队员 */
export const removePerson = (data = {}) => {
	return request({
		url: "/public/gameSignUp/leadRemovedExamine",
		method: "GET",
		data,
	})
}

/* 球队提交审核 */
export const submitAuditApi = (data = {}) => {
	return request({
		url: "/public/gameSignUp/applySubmitTeamExamine",
		method: "GET",
		data,
	})
}

/* 在线报名 */
export const signup = (data = {}) => {
	return request({
		url: "/public/gameSignUp/saveGameSignUp",
		method: "POST",
		data,
	})
}

/* 查询报名详情 */
export const querySignupDetail = (data ={}) => {
	return request({
		url: "/public/gameSignUp/getGameSignUpById",
		method: "GET",
		data,
	})
}

/*查询球员列表 */
export const queryTeammateList = (data={} ) => {
	return request({
		url: "/public/gameSignUp/getGameSignUpPage",
		method: 'POST',
		data,
	})
}

/* 赛事列表 */
export const getMatchList = () => {
	return request({
		url: "/public/game/all",
		method: "GET"
	})
}

/* 发起支付 */
export const payOrder = (orderNo) => {
	return request({
		url: `/public/gameOrder/prepayId/${orderNo}`,
		method: "POST"
	})
}